import React from 'react';
import ReactDom from 'react-dom';
import SearcherDropdown from './dropdown';

export default class Searcher extends React.Component {
  constructor(props) {
    super(props);
    this.searcherDropdown = React.createRef();
  }

  boot(opts) {
    ReactDom.render(<SearcherDropdown ref={this.searcherDropdown} />, opts.container);
  }

  onChange = (value) => {
    this.searcherDropdown.current.onChange(value);
  };
}
